import rxAjax from '@/assets/js/ajax.js';
import AtsHolidayPolicyDetailApi from "@/api/oa/ats/atsHolidayPolicyDetail";

//考勤组明细 api接口
export const AtsAttenceGroupDetailApi = {};

AtsAttenceGroupDetailApi.baseUrl= '/api-oa/oa/ats/atsAttenceGroupDetail';
AtsAttenceGroupDetailApi.exportUrl= AtsAttenceGroupDetailApi.baseUrl + '/listExport';

//查询列表
AtsAttenceGroupDetailApi.query=function (parameter) {
  var url= AtsAttenceGroupDetailApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
AtsAttenceGroupDetailApi.get =function(pkId) {
  var url= AtsAttenceGroupDetailApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
AtsAttenceGroupDetailApi.save =function(parameter) {
  var url= AtsAttenceGroupDetailApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
AtsAttenceGroupDetailApi.del =function(parameter) {
  var url= AtsAttenceGroupDetailApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

//查询全部数据
AtsAttenceGroupDetailApi.getAll = function () {
  var url = AtsAttenceGroupDetailApi.baseUrl + '/getAll';
  return rxAjax.get(url);
}

AtsAttenceGroupDetailApi.getMainId = function (Id) {
  var url = AtsAttenceGroupDetailApi.baseUrl + '/getMainId?id=' + Id;
  return rxAjax.get(url);
}

export  default AtsAttenceGroupDetailApi;

